#include<iostream>
using namespace std;
int main(){
	int x;
	scanf("%d",&x);
	if(x<=100000){
		printf("%.0f\n",x*0.1);
	}else if(x<=200000){
		printf("%.0f\n",100000*0.1+(x-100000)*0.075);
	}else if(x<=400000){
		printf("%.0f\n",100000*0.1+100000*0.075+(x-200000)*0.05);
	}else if(x<=600000){
		printf("%.0f\n",(x-400000)*0.03);
	}else if(x<=1000000){
		printf("%.0f\n",(x-600000)*0.015);
	}else{
		printf("%.0f\n",(x-1000000)*0.01);
	}
	return 0;
}
